<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="css/base30_font.css"/>
    <link rel="stylesheet" type="text/css" href="css/advice.css"/>
    <title>用户资料</title>
    <meta name="keywords" content="用户资料"/>
    <meta name="description" content="用户资料"/>
    <meta name="HandheldFriendly" content="true"/>
    <meta name="MobileOptimized" content="width"/>
    <meta id="viewport" content="width=device-width, user-scalable=no, initial-scale=1" name="viewport"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-retina.png">
    <script type="text/javascript">
        var viewPortScale;
        var dpr = window.devicePixelRatio;
        viewPortScale = 0.5;
        //
        var detectBrowser = function (name) {
            if (navigator.userAgent.toLowerCase().indexOf(name) > -1) {
                return true;
            } else {
                return false;
            }
        };
        var width = parseInt(window.screen.width);
        if (detectBrowser("mz-m2") || detectBrowser("m2 note") || detectBrowser("mz-mx5") || detectBrowser("mz-mx6")) width = window.outerWidth;
        var scale = width / 640;
        var userScalable = 'no';
        if (detectBrowser("qq/")) userScalable = 'yes';
        document.getElementById('viewport').setAttribute(
                'content', 'target-densitydpi=device-dpi,width=640,user-scalable=' + userScalable + ',initial-scale=' + scale);
        var turnToWebUrl = 'http://www.tuniu.com/';

        var globalCheckIsInWebview = function () {
            var checkDeviceType = document.cookie.match(new RegExp('(^| )deviceType=([^;]*)(;|$)'));
            if (checkDeviceType && checkDeviceType[2] && (checkDeviceType[2] == '0' || checkDeviceType[2] == '1')) {
                return true;
            } else {
                return false;
            }
        };

        // 在head中请求`getCurrentCityInfoAjax`
        (function () {
            /**
             * criteo
             * @author yinqian@tuniu.com
             * @update 2015-06-02 14:00:18
             */
            var criteoHeaderFunc = function () {
                var criteoScript = document.createElement("script");
                criteoScript.type = 'text/javascript';
                criteoScript.src = '//static.criteo.net/js/ld/ld.js';
                document.querySelector('head').appendChild(criteoScript);
            };

            var gaStatus = {
                loaded: false,
                cityName: ""
            };

            var elAjaxUrl = 'ajax/getCurrentCityInfoAjax.txt';

            try {
                var hash = window.location.hash.replace(/^#/, ''),
                        request = new XMLHttpRequest(),
                        request1 = new XMLHttpRequest(),
                        getCityUrlHash = '',
                        getCityUrlArr;

                if (hash !== '') {
                    hash += "&referer=" + encodeURIComponent(document.referrer);
                } else {
                    hash += "referer=" + encodeURIComponent(document.referrer);
                }

                if (elAjaxUrl.match(/#/)) {
                    getCityUrlArr = getCityUrl.split('#');
                    elAjaxUrl = getCityUrlArr[0];
                    getCityUrlHash = getCityUrlArr[1];
                } else {
                    getCityUrlHash = '';
                }

                if (elAjaxUrl.match(/\?/)) {
                    elAjaxUrl += "&" + hash;
                } else {
                    elAjaxUrl += "?" + hash;
                }

                if (getCityUrlHash !== '') {
                    elAjaxUrl += "#" + getCityUrlHash;
                }


                request.onreadystatechange = function () {
                    if (request.readyState == 4) {
                        var data = JSON.parse(request.responseText),
                                cityName;

                        if (typeof(data.data.cityName) != "string") {
                            cityName = "上海";
                        } else {
                            cityName = data.data.cityName;
                        }

                        // GA增加统计内容
                        var gaAddon = {
                            isWebview: globalCheckIsInWebview() ? 'true' : 'false',
                        };

                        var getTelConsultAjax = document.querySelector('#getTelConsultAjax');
                        var url = "";
                        if (getTelConsultAjax) {
                            url = getTelConsultAjax.value;
                        } else {
                            return;
                        }
                        var telConsult = document.querySelector('#telConsult');
                        var dotAjax = document.querySelector("#dotAjax");
                        request1.open("GET", url, true);
                        request1.withCredentials = true;
                        request1.send();
                        request1.onreadystatechange = function () {
                            if (request1.readyState == 4) {
                                var data = JSON.parse(request1.responseText);
                                tuniu_common.cookie.set("tel_400", data.data.telConsult);
                                telConsult.href = "tel:" + data.data.telConsult;
                                telConsult.onclick = function () {
                                    try {
                                        if (dotAjax) {
                                            $.ajax({
                                                url: dotAjax.value + '?data={"type": 1, "book_type": 0, "submit_type": 0, "page_type": 1}',
                                                success: function () {
                                                    window.location = telConsult.href;
                                                }
                                            });
                                            return false;
                                        }
                                    } catch (e) {
                                        window.location = telConsult.href;
                                    }
                                }
                            }
                        }
                    }
                };

                request.open('GET', elAjaxUrl, true);
                request.withCredentials = true;
                request.send();
            } catch (e) {
                console.debug(e);
            }
        })();
    </script>
</head>
<body>
<div class="wrapper" id="wrapper">
    <div id="index">
        <header class="header-box fixed" id="header">
            <a class="header-back btn" onclick="javascript: history.go(-1);">
                <i class="icon-title-back"></i>
            </a>
            <h1>用户资料</h1>
        </header>
        <div class="tab-box">
            <div class="tab inline" id="contactBox">
                <span class="title">用户名</span><input id="userName" class="advice-contact" type="text"
                                                      placeholder="" value="飞翔的骆驼">
            </div>
            <div class="tab" id="frameBox">
                <div class="title">自我介绍</div>
                <textarea id="userAdvice" class="advice-frame"
                          placeholder="赠送我们的牛宝，谢谢大家！"></textarea>
            </div>
            <div class="tab inline" id="contactBox">
                <span class="title">手机号</span><input id="userName" class="advice-contact" type="text"
                                                      placeholder="" value="13715485220">
            </div>
        </div>
        <div class="submit btn" id="submit">提交</div>
        <input id="getTelConsultAjax" type="hidden" value="http://dynamic.m.tuniu.com/site/getTelConsultAjax">
        <input id="doAddAdviceAjax" type="hidden" value="http://dynamic.m.tuniu.com/contact/doAddAdviceAjax">
        &nbsp;    </div>
</div>

<script type="text/javascript">
    var no_show_download_p_value = [15485, 16276, 14816, 16194, 14895, 16238, 16576, 16670, 16524, 16525, 16526, 16527, 16528, 16529, 16530, 16531, 16532, 16533, 16534, 16238, 16535, 16667];
    var no_show_slider_p_value = [16276];
    var pageName = "无线:会员中心:意见反馈:2337445";

</script>
<input type="hidden" id="appTitle" name="appTitle" value="意见反馈"/>

<div id="tn_app_top_bar" style="display: none;">
    <input id="top_bar_title" value="意见反馈"/><input id="top_bar_sub_title" value=""/><input id="top_bar_show_refresh"
                                                                                           value=""/>
</div>
<script type="text/javascript" src="js/common/commonV2.js"></script>
<script type="text/javascript" src="js/sea-modules/seajs/1.3.1/sea.js"></script>
<script type="text/javascript" src="js/new_config.js"></script>
<script type="text/javascript" src="js/business-modules/member/advice.js"></script>
</body>
</html>